package com.happyfamily.springboot.crowdsourcingplatform.dao.sun;

import com.happyfamily.springboot.crowdsourcingplatform.model.Bank;
import org.apache.ibatis.annotations.*;

@Mapper
public interface BankDao
{
	@Insert("INSERT INTO bank_account (baccount,bname,bmoney) VALUES (#{baccount},'联盟账户',0)")
	public abstract int addBank(Bank bank);

	@Update("UPDATE bank_account SET bmoney=#{money} WHERE baccount=#{account}")
	public abstract int updateMoney(String money,String account);

	@Select("SELECT * FROM bank_account WHERE baccount=#{account}")
	public abstract Bank getBank(String account);

	@Delete("DELETE FROM bank_account WHERE baccount=#{account}")
	public abstract int deleteBank(String account);
}